package com.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.service.UserService;

//建立action
@Component
@Scope("prototype")//声明action为多例
public class UserAction {
	
	@Autowired
	private UserService userService;
	
	public String execute() {
		System.out.println("action被执行到");
		userService.add();
		return null;
	}
}
